#include <stdio.h>

int main() {
    double n, sum = 0.0;

    printf("This program sums a series of doubles.\n");
    printf("Enter doubles (0 to terminante): ");

    do {
        scanf("%lf", &n);
        sum += n;
    } while (n);

    printf("The sum is: %lf\n", sum); // C99

    return 0;
}
